import http from "@/http/index";

export default {

    insert: {
        name: "新增采购单",
        url: "/api/po",
        call: async function (params: any = {}){
            return await http.post(this.url, params)
        }
    },
    select: {
        name: "查询采购单",
        url: "/api/po",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    select_items: {
        name: "查询采购单明细",
        url: "/api/po/items",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    patch: {
        name: "单据状态更新",
        url: "/api/po",
        call: async function (params: any = {}) {
            return await http.patch(this.url, params)
        }
    }
}